package Service.ServiceImpl;

import Dao.BreakRuleDao;
import Dao.DaoImpl.BreakRuleDaoImpl;
import Service.BreakRuleService;
import domain.BreakRule;

import java.util.HashMap;
import java.util.List;

public class BreakRuleServiceImpl implements BreakRuleService {
    private BreakRuleDao dao = new BreakRuleDaoImpl();
    @Override
    public void addBreakRuleDao(BreakRule rule) {
        dao.addBreakRuleDao(rule);
    }

    @Override
    public List<BreakRule> fuzzySelectBreakRule(HashMap<String,String> map) {
        return dao.fuzzySelectBreakRule(map);
    }

    @Override
    public List<BreakRule> breakRuleList() {
        return dao.breakRuleList();
    }

    @Override
    public BreakRule selectBreakRuleById(int id) {
        return dao.selectBreakRuleById(id);
    }

    @Override
    public void DelBreakRule(int id) {
        dao.DelBreakRule(id);
    }

    @Override
    public void UpdateBreakRule(BreakRule breakRule, int id) {
        dao.UpdateBreakRule(breakRule,id);
    }
}
